package com.groupbuying.store.controller.forManage;

import com.groupbuying.store.service.StoreCapitalVirtualAccountDetailService;
import com.groupbuying.store.service.StoreCapitalVirtualAccountService;
import com.groupbuying.store.utils.JSONUtils;
import com.groupbuying.store.utils.PageUtils;
import com.groupbuying.store.utils.R;
import com.groupbuying.store.utils.ReturnUtils;
import com.groupbuying.store.utils.apiresult.ApiResult;
import com.groupbuying.store.utils.apiresult.JsonUtils;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @anthor wenguoqiang
 * @date: 2019/04/03 17:04
 * @company 够样
 * @des
 **/
@RestController
@RequestMapping("/storeVirtualAccountManage")
public class StoreVirtualAccountManageController {

    private static Logger logger = LoggerFactory.getLogger(StoreVirtualAccountManageController.class);

    @Autowired
    private StoreCapitalVirtualAccountDetailService storeCapitalVirtualAccountDetailService;

    @GetMapping("/getListByPage")
    public R getListByPage(@RequestParam Map<String, Object> params){

       return  storeCapitalVirtualAccountDetailService.getListByPage(params);
    }

    @GetMapping("/getFinancialPwdList")
    public PageUtils getFinancialPwdList(@RequestParam Map<String, Object> params){
        logger.error("StoreVirtualAccountManageController-->getFinancialPwdList params:::"+params);
        return storeCapitalVirtualAccountDetailService.getFinancialPwdList(params);
    }

    @GetMapping("/changePwd")
    public ApiResult changePwd(@RequestParam Map<String, Object> params){
        logger.error("StoreVirtualAccountManageController-->getFinancialPwdList params:::"+ JsonUtils.objectToJson(params));
        return storeCapitalVirtualAccountDetailService.changePwd(params);
    }
}
